<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>毕业生档案管理系统 - 毕业管理 </title>
    <meta name="Copyright" content="Douco Design."/>
    <link href="${pageContext.request.contextPath}/css/public.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/global.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.tab.js"></script>
</head>
<body>
<div id="dcWrap">
    <div id="dcHead">
        <div id="head">
            <div class="nav">
                <ul class="navRight">
                    <c:choose>
                        <c:when test="${sessionScope.userInfo.basicinformationRole=='教师'}">
                            <li>
                                当前用户：${sessionScope.userInfo.basicinformationRole}:${sessionScope.userInfo.teacherName}</li>
                        </c:when>
                        <c:otherwise>
                            <li>
                                当前用户：${sessionScope.userInfo.basicinformationRole}:${sessionScope.userInfo.basicinformationName}</li>
                        </c:otherwise>
                    </c:choose>
                    <li class="noRight"><a href="${pageContext.request.contextPath}/login/loginOut.action">退出</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>

<!-- dcHead 结束 -->
<div id="dcLeft">
    <div id="menu">
        <ul class="top">
            <li><a href="${pageContext.request.contextPath}/index.jsp"><i class="home"></i><em>管理首页</em></a></li>
        </ul>
        <ul>
            <c:choose>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='教师' && sessionScope.userInfo.teacherType eq 1}">
                    <li><a href="${pageContext.request.contextPath }/basicinformation/selectLimit.action">
                        <i class="system"></i><em>新生档案管理</em></a>
                    </li>
                </c:when>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='学生'}">
                    <li><a href="${pageContext.request.contextPath }/basicinformation/selectLimit.action"><i
                            class="system"></i><em>新生档案管理</em></a></li>
                </c:when>
            </c:choose>
            <c:choose>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='教师'}">

                    <li><a href="${pageContext.request.contextPath}/achievement/selectLimit.action">
                        <i class="nav"></i><em>在校管理</em></a></li>
                </c:when>
                <c:otherwise>
                    <li><a href="${pageContext.request.contextPath}/achievement/selectLimitStu.action">
                        <i class="nav"></i><em>在校管理</em></a></li>

                </c:otherwise>
            </c:choose>
            <c:choose>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='教师' && sessionScope.userInfo.teacherType eq 1}">
                    <li class="cur"><a href="${pageContext.request.contextPath }/graduation/selectLimit.action"><i
                            class="show"></i><em>毕业管理</em></a></li>
                </c:when>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='学生'}">
                    <li class="cur"><a href="${pageContext.request.contextPath }/graduation/selectLimitStu.action"><i
                            class="show"></i><em>毕业管理</em></a></li>
                </c:when>
            </c:choose>
        </ul>
    </div>
</div>


<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">毕业生档案管理系统<b>></b><strong>毕业管理</strong></div>
    <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3>毕业管理</h3>

        <script type="text/javascript">

            $(function () {
                $(".idTabs").idTabs();
            });

        </script>
        <div class="idTabs">
            <ul class="tab">
                <li><a href="#select">档案查询</a></li>
                <c:choose>
                    <c:when test="${sessionScope.userInfo.basicinformationRole=='教师' && sessionScope.userInfo.teacherType eq 1}">
                        <li><a href="#deletion">档案缺失管理</a></li>
                        <li><a href="#mail">档案寄发管理</a></li>
                    </c:when>
                </c:choose>
            </ul>
        </div>
        <div class="items">
            <!--档案查询-->
            <div id="select">
                <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">

                    <c:choose>
                        <c:when test="${sessionScope.userInfo.basicinformationRole=='教师' && sessionScope.userInfo.teacherType eq 1}">
                            <form action="${pageContext.request.contextPath }/graduation/selectLimit.action"
                                  method="post">
                                <tr>
                                    <td colspan="14" align="right">
                                        <input type="text" name="keywords" title="请输入姓名">
                                        <input type="submit" value="搜索">
                                    </td>
                                </tr>
                            </form>
                        </c:when>
                    </c:choose>
                    <tr>
                        <th width="20">序号</th>
                        <th>姓名</th>
                        <th>学号</th>
                        <th>院系</th>
                        <th>专业班级</th>
                        <th>缺失档案</th>
                        <th>寄发单位</th>
                        <th>寄发状态</th>
                        <th>回执单号</th>
                    </tr>
                    <c:forEach items="${graduationPage.list}" var="list" varStatus="pageIndex">
                        <tr>
                            <td>${pageIndex.count}</td>
                            <td>${list.basicinformation.basicinformationName}</td>
                            <td>${list.basicinformation.basicinformationId}</td>
                            <td>${list.basicinformation.institute.instituteName}</td>
                            <td>${list.basicinformation.basicinformationClass}</td>
                            <td>${list.graduationLack}</td>
                            <td>${list.graduationSendingunit}</td>
                            <td>${list.graduationCondition}</td>
                            <td>${list.graduationReturn}</td>
                        </tr>
                    </c:forEach>
                    <c:choose>
                        <c:when test="${sessionScope.userInfo.basicinformationRole=='教师'}">
                            <tr>
                                <td colspan="9" align="center">
                                    第${graduationPage.pageIndex }/${graduationPage.pageCount }页 &nbsp; &nbsp;
                                    <a href="${pageContext.request.contextPath }/graduation/selectLimit.action?pageIndex=1">首页</a>
                                    <c:choose>
                                        <c:when test="${graduationPage.pageIndex > 1}">
                                            <a href="${pageContext.request.contextPath }/graduation/selectLimit.action?pageIndex=${graduationPage.pageIndex - 1}">上一页</a>
                                        </c:when>
                                        <c:otherwise>
                                            上一页
                                        </c:otherwise>
                                    </c:choose>

                                    <c:choose>
                                        <c:when test="${graduationPage.pageIndex  < graduationPage.pageCount}">
                                            <a href="${pageContext.request.contextPath }/graduation/selectLimit.action?pageIndex=${graduationPage.pageIndex + 1}">下一页</a>
                                        </c:when>
                                        <c:otherwise>
                                            下一页
                                        </c:otherwise>
                                    </c:choose>
                                    <a href="${pageContext.request.contextPath }/graduation/selectLimit.action?pageIndex=${graduationPage.pageCount}">尾页</a>
                                </td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr>
                                <td colspan="9" align="center">
                                    第${graduationPage.pageIndex }/${graduationPage.pageCount }页 &nbsp; &nbsp;
                                    <a href="${pageContext.request.contextPath }/graduation/selectLimitStu.action?pageIndex=1">首页</a>
                                    <c:choose>
                                        <c:when test="${graduationPage.pageIndex > 1}">
                                            <a href="${pageContext.request.contextPath }/graduation/selectLimitStu.action?pageIndex=${graduationPage.pageIndex - 1}">上一页</a>
                                        </c:when>
                                        <c:otherwise>
                                            上一页
                                        </c:otherwise>
                                    </c:choose>

                                    <c:choose>
                                        <c:when test="${graduationPage.pageIndex  < graduationPage.pageCount}">
                                            <a href="${pageContext.request.contextPath }/graduation/selectLimitStu.action?pageIndex=${graduationPage.pageIndex + 1}">下一页</a>
                                        </c:when>
                                        <c:otherwise>
                                            下一页
                                        </c:otherwise>
                                    </c:choose>
                                    <a href="${pageContext.request.contextPath }/graduation/selectLimitStu.action?pageIndex=${graduationPage.pageCount}">尾页</a>
                                </td>
                            </tr>
                        </c:otherwise>
                    </c:choose>

                </table>
            </div>

            <c:choose>
                <c:when test="${sessionScope.userInfo.basicinformationRole=='教师' && sessionScope.userInfo.teacherType eq 1}">
                    <!-- 档案缺失管理 -->
                    <div id="deletion">
                        <form action="${pageContext.request.contextPath}/graduation/insertExcelLack.action"
                              method="post"
                              enctype="multipart/form-data">
                            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                                <tr>
                                    <th width="131">名称</th>
                                    <th>内容</th>
                                </tr>

                                <tr>
                                    <td align="right">档案缺失汇总文档</td>
                                    <td>
                                        <input type="file" name="deletion" size="18"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        <input name="submit" class="btn" type="submit" value="提交"/>
                                    </td>
                                    <div style="color:red;width: 100%;text-align: center">${messageGraduationLack}</div>
                                </tr>
                            </table>
                        </form>
                    </div>


                    <!--档案寄发管理-->
                    <div id="mail">
                        <form action="${pageContext.request.contextPath}/graduation/insertExcel.action" method="post"
                              enctype="multipart/form-data">
                            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                                <tr>
                                    <th width="131">名称</th>
                                    <th>内容</th>
                                </tr>
                                <tr>
                                    <td align="right">档案寄发汇总文档</td>
                                    <td>
                                        <input type="file" name="deletion" size="18"/>
                                    </td>
                                </tr>

                                <tr>
                                    <td></td>
                                    <td>
                                        <input name="submit" class="btn" type="submit" value="提交"/>
                                    </td>
                                    <div style="color:red;width: 100%;text-align: center">${messageGraduation}</div>

                                </tr>


                            </table>
                        </form>
                    </div>
                </c:when>
            </c:choose>
        </div>
    </div>
</div>

<div class="clear"></div>
</body>
</html>